﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace VoteInformationSystem.Models
{
    public interface IWahlkreisRepository
    {
        /// <summary>
        /// Returns a Wahlkreis object that has the given id Id as its primary key, or null if nonexistant.
        /// </summary>
        /// <param name="Id">The primary key to look for</param>
        /// <returns>A Wahlkreis object with the given Id, or null if no such exists</returns>
        Wahlkreis Get(int Id);

        /// <summary>
        /// Returns 3 Wahlkreis objects. Calculates from single votes.
        /// </summary>
        IEnumerable<Wahlkreis> GetQ7();

        /// <summary>
        /// Returns all Wahlkreis objects that are associated with a Bundesland of the given primary key, or an empty list if no such exists.
        /// </summary>
        /// <param name="Id">The primary key of Bundesland to look for</param>
        /// <returns>All Wahlkreis objects associated with a Bundesland of the given <paramref name="LandId"/>, or an empty list if no such exists</returns>
        IEnumerable<Wahlkreis> GetByBundesland(int LandId);

        /// <summary>
        /// Returns the Wahlkreis object associated with the Bundestagswahl of the given <paramref name="IdVorherigeBundestagswahl"/> with the same Name as
        /// the Wahlkreis of the given <paramref name="Id"/>.
        /// </summary>
        /// <param name="Id">Id of the Wahlkreis for which to find its predecessor</param>
        /// <param name="IdVorherigeBundestagswahl">Id of the Bundestagswahl where the predecessor Wahlkreis is to be found</param>
        /// <returns>Previous Wahlkreis for given Wahlkreis ID and previous Bundestagswahl ID.</returns>
        Wahlkreis GetPrevious(int Id, int IdVorherigeBundestagswahl);

        /// <summary>
        /// List of direct candidates for a given Wahlkreis.
        /// </summary>
        /// <param name="WahlkreisId"></param>
        /// <returns></returns>
        IEnumerable<Direktkandidat> GetDirektkandidaten(int WahlkreisId);


    }
}
